gtk_css_style_snapshot_icon_paintable: Fix uninitialized memory access
authorAlexander Larsson <alexl@redhat.com>
Thu, 6 Feb 2020 15:23:11 +0000 (16:23 +0100)
committerAlexander Larsson <alexl@redhat.com>
Thu, 6 Feb 2020 16:47:56 +0000 (17:47 +0100)
We were reading the foreground color alpha even when we didn't read it.

gtk/gtkrendericon.c

index ddb889642c3ac8836ae0d8c0b7c60a0df61ebfbb..a434c73010ad9b9fa0125f028a62b06dc041e4c9 100644 (file)
@@ -114,10 +114,12 @@ gtk_css_style_snapshot_icon_paintable (GtkCssStyle  *style,
 
   is_icon_paintable = GTK_IS_ICON_PAINTABLE (paintable);
   if (is_icon_paintable)
-    gtk_icon_theme_lookup_symbolic_colors (style, &fg, &sc, &wc, &ec);
+    {
+      gtk_icon_theme_lookup_symbolic_colors (style, &fg, &sc, &wc, &ec);
 
-  if (fg.alpha == 0.0f)
-    goto transparent;
+      if (fg.alpha == 0.0f)
+        goto transparent;
+    }
 
   if (transform == NULL)
     {